package com.atom.app.lifecycle.db

import androidx.room.TypeConverter
import java.util.*

class DateToLongConverter {

    @TypeConverter
    fun longToDate(value: Long?): Date? {
        return value?.let { Date(value) }
    }

    @TypeConverter
    fun dataToLong(value: Date?): Long? {
        return value?.time
    }
}
